@extends("admin.public.layout")

@section("content")

    <div class="container-xxl flex-grow-1 container-p-y">



        <div class="card">
            <div class="card-header">
                <div class="row">
                    <div class="col-md-10">
                        <h5>{{$pageName}}</h5>
                    </div>
                    <div class="col-md-2">
                        <a class="btn btn-primary" href="{{route("adminRoleCreate")}}"><i class="ti ti-circle-plus me-1"></i>添加段落</a>
                    </div>
                </div>
            </div>
            <div class="card-body">
                <div class="table-responsive text-nowrap">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>角色名字</th>
                            <th>角色标识</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody class="table-border-bottom-0">


                        @foreach($roles as $role)
                            <tr>
                                <td>{{$role->id}}</td>
                                <td>{{$role->role_name}}</td>
                                <td>{{$role->role_code}}</td>
                                <td>
                                    <div class="dropdown">
                                        <button type="button" class="btn p-0 dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
                                            <i class="ti ti-dots-vertical"></i>
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="{{route("adminRoleEdit", ['id' =>$role->id])}}"><i class="ti ti-pencil me-1"></i> 编辑</a>
                                            <a class="dropdown-item" href="{{route("adminRoleDelete",['id' =>$role->id])}}"><i class="ti ti-trash me-1"></i> 删除</a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        @endforeach

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- / Content -->

@endsection
